# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         demo12
# Description:
# Author:       98745
# Date:         2019/3/7
#-------------------------------------------------------------------------------

import re
e='[0-9a-zA-Z]+@[0-9a-zA-Z]+\.[a-zA-Z]{2,3}'
r=re.findall(e,'lining@geekori.com')
print(r)
r=re.findall(e,'abcdef@aa')
print(r)
r=re.findall(e,'我的email是lining@geekori.com，不是bill@geekori.com')
print(r)
ip='\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'
r=re.findall(ip,'这是我的ip地址：33.12.32.43,你的是：100.23.34.22')
print(r)
url='https?:/{2}.+'
url1='https://geekori.com'
url2='ftp://geekori.com'
print(re.match(url,url1))
print(re.match(url,url2))